import Vue from 'vue'
import Vuerouter from 'vue-router'
import index from "../views/index/index";
import product from "../views/product/product";
import myInfo from "../views/myInfo/myInfo";
import laboratory from "../views/laboratory/laboratory";
import news from "../views/news/news";
import productdetail from "../views/product/productDetail";
import labdetail from "../views/laboratory/labDetail";
import newsdetail from "../views/news/newsDetail";
Vue.use(Vuerouter)

const routes = [
  {
    path: '/',
    redirect:'/index'
  },
  {
    path: '/index',
    name: 'Index',
    component: index
  },
  {
    path: '/product',
    name: 'Product',
    component: product,
  },
  {
    path: '/myinfo',
    name: 'myinfo',
    component: myInfo,
  },
  {
    path: '/lab',
    name: 'laboratory',
    component: laboratory,
  },
  {
    path: '/news',
    name: 'news',
    component: news,
  },
  {
    path: '/productdetail',
    name: 'productdetail',
    component: productdetail,
  },
  {
    path: '/labDetail',
    name: 'labDetail',
    component: labdetail,
  },
  {
    path: '/newsdetail',
    name: 'newsdetail',
    component: newsdetail,
  },
  // {
  //   path: '/',
  //   name: 'Home',
  //   component: Home
  // },
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new Vuerouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
